import { ModelInfo } from "../../scene/player/info/ModelInfo";
import { TBoss } from "../../../../Message/Db/Tables/TBoss";
import { BossRefreshConfig } from "../BossRefreshConfig";
import { EBossType } from "../../../../Message/Public/EBossType";
import { NationalTreasureConfig } from "../NationalTreasureConfig";
import { Game } from "../../Game";
type int = number;
//class BossInfo
    
    export  class BossInfo extends ModelInfo
    {
        constructor(arg1: TBoss)
        {
            
            super();this._boss = arg1;
            return;
        }

        public get boss(): TBoss
        {
            return this._boss;
        }

        public /* override */ get modelId(): string
        {
            return this._boss.modelId + "";
        }

        public get code(): int
        {
            return this._boss.code;
        }

        public get type(): int
        {
            return this._boss.type;
        }

        public inBossRefreshPlan(arg1: Array<any>): Boolean
        {
            var loc1=null;
            var loc2=null;
            if (arg1 && arg1.length > 0) 
            {
                loc1 = BossRefreshConfig.instance.getInfoByBossCode(this.code);
                if (loc1 && loc1.length > 0) 
                {
                    var loc3=0;
                    var loc4=loc1;
                    for(loc2 of loc4) 
                    {
                        if (arg1.indexOf(loc2.plan + "") == -1) 
                        {
                            continue;
                        }
                        return true;
                    }
                }
            }
            return false;
        }

        public isNationalTreaBoss(): Boolean
        {
            if (this.type == EBossType._EBossTypeCollection) 
            {
                return this.inBossRefreshPlan(NationalTreasureConfig.instance.getBossRefreshPlanByCamp(Game.sceneInfo.sMapDefine.campType.__value));
            }
            return false;
        }

        /* internal */ /* var */_boss: TBoss;
    }
